Method, apparatus, and computer program for embedding digital watermark, and method, apparatus, and computer program product for extracting digital watermark

ABSTRACT

A method for embedding a digital watermark includes a step of inputting digital watermark information; a step of inputting an image; a step of dividing the image into a plurality of areas; a step of ordering the plurality of areas according to a predetermined ordering criterion; a step of embedding the digital watermark information over the plurality of areas that have been ordered; and a step of outputting an image with the digital watermark information embedded therein.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to techniques for embedding digitalwatermark information mainly in document images.

[0003] 2. Description of the Related Art

[0004] Recently, in the trend of networking and digitization of mediafor text data, image data, audio data, and the like, demand has arisenfor prevention of unauthorized copying of digital data and forassociation of meta data with digital data. Still, however, documentsand images are often distributed in the form of printed materials. Sinceboth digital data and printed materials are used as described above,demand has also arisen for techniques for controlling a destination towhich digital data is to be distributed in the form of a printedmaterial or linking a printed material with digital data. Under suchcircumstances, interest has arisen for a method for embeddinginformation by digitally watermarking a multi-level still image ordocument image.

[0005] Embedding of information by digital watermarking is a techniquefor modifying part of original data to embed information, in ahuman-unperceivable manner, in digital image data, audio data, or textdata.

[0006] For example, as techniques for embedding and extracting a digitalwatermark in and from a multi-level image, various methods based on theredundancy of the intensity levels of pixels are generally known. Also,as a technique for digitally watermarking a document image that is abinary image, several digital watermarking methods based oncharacteristics specific to document images are known. For example, amethod of embedding digital watermark information by changing the lengthof a space between words of English text (alphabetic text) according toa predetermined criterion is known. Such a method is disclosed, forexample, in Japanese Patent Laid-Open No. 9-186603 (U.S. Pat. No.5,861,619).

[0007] According to the digital watermarking method for documents,digital watermark information is represented by varying the lengths ofspaces between words or between characters so that one-bit information(either “1” or “0”) will be assigned according to the values of the twospace lengths.

[0008] In another method, digital watermark information is embedded in acharacter by rotating the character to change a tilt angle thereof. Suchtechniques are disclosed, for example, in Nakamura and Matsui,“Wa-bunsho heno shiir-ugazou niyoru denshisukashi” (which could betranslated as “Digital Watermarking of Japanese Documents using SealImages”), November 1997 (Transactions of IPSJ, Vol. 38-No. 11).

[0009] A document image in which digital watermark information isembedded according to the related art will be described with referenceto FIG. 13. FIG. 13 is a schematic diagram showing an example of adocument image in which digital watermark information has been embeddedby rotating a character to change a tilt angle thereof according to therelated art.

[0010] For example, if a character is rotated clockwise, “1” is embeddedin the character (as in character (1) in FIG. 13), and if a character isrotated counterclockwise, “0” is embedded in the character (as incharacter (2) in FIG. 13). Digital watermark may be embedded incontinuous characters, at an interval of several characters, or incharacters at predetermined positions.

[0011] Referring to FIG. 13, since the character (1) is rotatedclockwise and the character (2) is rotated counterclockwise, informationrepresenting “10” is embedded.

[0012] However, regarding embedding of digital watermark information indocument images according to the related art, a method of embedding adigital watermark with consideration of the layout of characters in thedocument image has not been established. For example, when a digitalwatermark is embedded in a document image by the method according to therelated art, a feature regarding each character or each character and anadjacent space is considered. When the layout of the document image iscomplex, for example, when illustrations, tables and figures, and textareas are mixed or when the document image is multicolumned, if digitalwatermark information is embedded simply in each of the areas, thedigital watermark information becomes discontinuous among the areas.Thus, it is not allowed to embed digital watermark informationcontinuously, which is inconvenient.

SUMMARY OF THE INVENTION

[0013] The present invention has been made in view of the problemsdescribed above, and it is an object of the present invention to allow adigital watermark to be embedded continuously even in an image in whicha plurality of areas is disposed discretely, such as a document image.

[0014] In order to achieve the above object, the present invention, inone aspect thereof, provides a method for embedding a digital watermark,including a step of inputting digital watermark information; a step ofinputting an image; a step of dividing the image into a plurality ofareas; a step of ordering the plurality of areas according to apredetermined ordering criterion; a step of embedding the digitalwatermark information over the plurality of areas that have beenordered; and a step of outputting an image with the digital watermarkinformation embedded therein.

[0015] The present invention, in another aspect thereof, provides anapparatus for embedding a digital watermark, including an input unit forinputting digital watermark information; an image input unit forinputting an image; an area dividing unit for dividing the image into aplurality of areas; an area ordering unit for ordering the plurality ofareas according to a predetermined ordering criterion; an embedding unitfor embedding the digital watermark information over the plurality ofareas that have been ordered; and an output unit for outputting theimage with the digital watermark information embedded therein.

[0016] The present invention, in another aspect thereof, provides acomputer program product storing a program for embedding a digitalwatermark, the program including a step of inputting digital watermarkinformation; a step of inputting an image; a step of dividing the imageinto a plurality of areas; a step of ordering the plurality of areasaccording to a predetermined ordering criterion; a step of embedding thedigital watermark information over the plurality of areas that have beenordered; and a step of outputting an image with the digital watermarkinformation embedded therein.

[0017] The present invention, in another aspect thereof, provides amethod for detecting a digital watermark, including a step of inputtingan image with digital watermark information embedded therein; a step ofdividing the image into a plurality of areas; a step of ordering theplurality of areas according to a predetermined ordering criterion; astep of detecting the digital watermark information from over theplurality of areas that have been ordered; and a step of outputting thedigital watermark information detected.

[0018] The present invention, in another aspect thereof, provides anapparatus for detecting a digital watermark, including an input unit forinputting an image with digital watermark information embedded therein;a dividing unit for dividing the image into a plurality of areas; anarea ordering unit for ordering the plurality of areas according to apredetermined ordering criterion; a detecting unit for detecting thedigital watermark information from over the plurality of areas that havebeen ordered; and an output unit for outputting the digital watermarkinformation detected.

[0019] The present invention, in another aspect thereof, provides acomputer program product storing a program for detecting a digitalwatermark, the program including a step of inputting an image withdigital watermark information embedded therein; a step of dividing theimage into a plurality of areas; a step of ordering the plurality ofareas according to a predetermined ordering criterion; a step ofdetecting the digital watermark information from over the plurality ofareas that have been ordered; and a step of outputting the digitalwatermark information detected.

[0020] Further objects, features and advantages of the present inventionwill become apparent from the following description of the preferredembodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0021]FIG. 1 is a block diagram of a digital-watermark embeddingapparatus according to a first embodiment of the present invention.

[0022]FIG. 2 is a block diagram of a digital-watermark extractingapparatus, according to the first embodiment, for extracting digitalwatermark information embedded in a document.

[0023]FIG. 3 is a flowchart showing the procedure of a process forembedding digital watermark information.

[0024]FIG. 4 is a flowchart showing the procedure of a process forextracting digital watermark information.

[0025]FIG. 5 is a diagram for explaining an example method of a methodfor embedding a digital watermark.

[0026]FIG. 6 is a diagram for explaining an example of an orderingprocess in an area-ordering unit.

[0027]FIG. 7 is a diagram for explaining a digital-watermark extractingprocess in a digital-watermark extracting unit.

[0028]FIG. 8 is a diagram showing a result of dividing a document imageinto areas and ordering the areas.

[0029]FIG. 9 is a diagram for explaining the procedure of embeddingdigital watermark information according to a second embodiment.

[0030]FIG. 10 is a diagram for explaining the procedure of extractingdigital watermark information according to the second embodiment.

[0031]FIG. 11 is a diagram for explaining the concept of a frame in thesecond embodiment.

[0032]FIG. 12 is a diagram showing how digital watermark information isembedded in the second embodiment.

[0033]FIG. 13 is a diagram showing the related art for embedding digitalwatermark information by rotating characters.

[0034]FIG. 14 is a diagram showing a document image in which digitalwatermark information is yet to be embedded.

[0035]FIG. 15 is a diagram showing a document image in which digitalwatermark information has been embedded.

[0036]FIG. 16 is a diagram showing the configuration of a common imageprocessing apparatus based on which embodiments of the present inventioncan be implemented.

[0037]FIG. 17 is a diagram for explaining the procedure of a process forembedding digital watermark information according to a modification.

[0038]FIG. 18 is a diagram for explaining an example of a process forordering document areas according to a modification.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0039] Now, preferred embodiments of the present invention will bedescribed with reference to the drawings.

[0040] Algorithms for embedding or extracting digital-watermarkinformation in embodiments described below are only examples, and thepresent invention can be applied to various embedding or extractingalgorithms.

[0041] The embodiments will be described mainly with examples where tiltangles of characters are changed.

[0042] First Embodiment

[0043] First, the configurations of a digital-watermark embeddingapparatus and a digital-watermark extracting apparatus according to afirst embodiment of the present invention will be described withreference to the drawings.

[0044]FIG. 16 is a diagram showing the electrical configuration of animage processing apparatus for implementing a digital-watermarkembedding apparatus or a digital-watermark extracting apparatusaccording to a first embodiment of the present invention. In order toimplement a digital-watermark embedding apparatus or a digital-watermarkextracting apparatus, it is not necessary to incorporate all thefunctions of the blocks shown in FIG. 16.

[0045] Referring to FIG. 16, a computer 1601 is, for example, a personalcomputer that is commonly available. The computer 1601 is capable ofreceiving an image read by an image inputting apparatus 1617 such as ascanner, and editing or storing the image. Also, the computer 1601allows the image obtained by the image inputting apparatus 1617 to beprinted by a printer 1616. A user is allowed to issue various commandsusing a mouse 1613, a keyboard 1614, or the like.

[0046] Inside the computer 1601, blocks described below are connected toeach other via a bus 1607 so that various data can be exchanged amongthe blocks. Referring to FIG. 16, an MPU 1602 is capable of controllingthe operations of the blocks in the computer 1601, or executing programsthat are stored internally. A main memory 1603 temporarily storesprograms or image data to be processed for processing executed by theMPU 1602.

[0047] A hard disk drive (HDD) 1604 is capable of storing programs orimage data to be transferred to the main memory 1603, etc., and storingimage data that have been processed.

[0048] A scanner interface (I/F) 1615 is connected to a scanner 1617 forreading an original document, a film, or the like and generating imagedata, allowing input of image data obtained by the scanner 1617. Aprinter interface 1608 is connected to the printer 1616 for printingimage data, allowing image data for printing to be transferred to theprinter 1616.

[0049] A compact disk (CD) drive 1609 allows reading data from orwriting data to a CD (CD-R/CD-RW), which is a type of external storagemedium. Similar to the CD drive 1609, a floppy disk drive (FDD) 1611allows reading data from and writing data to a floppy disk.

[0050] A digital versatile disk (DVD) drive 1610 allows reading datafrom and writing data to a DVD, similar to the FDD 1611. If a programfor editing an image or a printer driver is stored in a CD, FDD, DVD, orthe like, the program is installed on the HDD 1604 and is transferred tothe main memory 1603 as required.

[0051] An interface (I/F) 1612 is connected to the mouse 1613 and akeyboard 1614 in order to accept commands input from these devices. Amonitor 1606 allows display of results of extracting digital watermarkinformation and status of processing. A video controller 1605 sendsdisplay data to the monitor 1606.

[0052] The present invention may be applied either to a system composedof a plurality of apparatuses (e.g., a host computer, an interfacedevice, a reader, a printer, etc.), or to a single apparatus (e.g., acopying machine, a facsimile machine, or the like).

[0053]FIG. 1 is a block diagram showing the configuration of adigital-watermark embedding apparatus according to the first embodimentof the present invention.

[0054]FIG. 3 is a flowchart showing the procedure of a digital-watermarkembedding process execute by the digital-watermark embedding apparatusaccording to the first embodiment. The operation is achieved by theinformation processing apparatus shown in FIG. 16, more specifically, bythe MPU 1602 executing a program loaded in the main memory 1603 inresponse to a command input from the mouse 1613 or the keyboard 1614. Itis also possible to monitor execution status and results of execution onthe monitor 1606.

[0055] First, in step S301, a document image (original image) 100 inwhich digital watermark information is to be embedded is input to anarea dividing unit 102 via an image input unit 101 such as the scanner1617 shown in FIG. 16.

[0056] The document image is obtained, for example, by inputting aprinted material from the scanner 1617 or the like and bitmapping theimage. Alternatively, the document image may be obtained by using imageprocessing software to convert and bitmap electronic data generatedusing a document-editing application program, or various electronic datain an application-specific format, a text format, etc., stored on theHDD 1604, or a storage medium connected to the CD drive 1609, the DVDdrive 1610, the FDD 1611, etc.

[0057] In step S302, the area dividing unit 102 divides the inputdocument image into a plurality of property areas, such as text areas,graphic areas, graph areas, and table areas.

[0058] Then, in step S303, an area ordering unit 103 orders areas havingtext property according to a rule described below.

[0059] Although various ordering criteria for ordering areas can beemployed, in this embodiment, as an example, document areas are orderedin decreasing order of size.

[0060] Watermarks are usually embedded in a document by units of eachcharacter (or each character and an adjacent space) in the document. Forexample, assuming that the sizes of the respective characters in thedocument are substantially the same, a large amount of digital watermarkinformation can be embedded in a document area of a large size.

[0061] By embedding desired digital watermark information continuouslywith priority given to document area of large sizes, the number ofdocument areas to be concatenated for embedding the digital watermarkinformation thereover is reduced. Thus, ordering by size is a validordering method.

[0062] Similarly, document areas may be ordered by decreasing order ofthe number of characters included in document area, that is, fromdocument areas including larger numbers of characters to document areasincluding smaller numbers of characters. This method is particularlyeffective in a case where the size of characters considerably differsfrom document area to document area.

[0063] When a plurality of document (text) areas has been successfullyordered unambiguously, circumscribed rectangles are extracted and adigital watermark is embedded in subsequent steps assuming the pluralityof text areas having been ordered as a continuous text (string). Thearea ordering unit 103 allows digital watermark information to beembedded continuously without dependency on various layouts, and thecontinuous digital watermark information to be extracted from theplurality of areas.

[0064]FIG. 6 is a flowchart for explaining an example method of atext-area ordering process executed by the area ordering unit 103. Thatis, the process corresponds to step S303 in the flowchart shown in FIG.3.

[0065] First, in step S601, text areas are ordered according to thesizes of the areas. This alone is not sufficient to order all the areasif areas with the same size exist. Thus, next in step S602, it isdetermined whether areas with the same size exist. If areas with thesame size exist (YES), the areas with the same size are orderedaccording to a second criterion. In this embodiment, in step S603, foreach of the relevant areas, a distance from the top left of the documentimage is calculated, and the areas are ordered from in increasing orderof the distance. This ordering is applied to each set of areas with thesame size. On the other hand, if areas with the same size do not exist(NO), the ordering process is exited.

[0066]FIG. 8 is a diagram showing an example of the result of orderingareas of a document image according to the first embodiment. Referringto FIG. 8, an area (1) having a largest size is ordered as the firstarea. An area (2) and an area (3) have the same size, so that asdescribed above, the area (2), with a smaller distance to the top left,is ordered before the area (3).

[0067] Then, in step S304, a circumscribed-rectangle extracting unit 104extracts rectangles circumscribed to characters included in each of theareas that have been ordered. Rectangles circumscribed to charactershave been known as information that represents areas in which charactersare to be recognized. In a digital watermark in this embodiment,circumscribed rectangles are used to represent respective characterareas where digital watermark information is to be embedded. A method ofdetecting circumscribed rectangles will be briefly described below.First, pixel values of a document image (document areas) are projectedto the vertical coordinate axis, and blank portions (portions wherecharacters in black are not present) are found for division on arow-by-row basis. Then, each of the rows of the document image isprojected to the horizontal coordinate axis, and blank portions arefound to divide the row on a character-by-character basis. Thus,rectangles circumscribed to the respective characters are obtained.

[0068] Then, a digital-watermark-information embedding unit 106 embedsdigital watermark information 105 input thereto in the document areas asa digital watermark. As a method of embedding digital watermarkinformation by the digital-watermark-information embedding unit 106 inthis embodiment, a procedure of embedding a digital watermark byrotating characters to change the tilt angles thereof will be described.However, the present invention covers cases where digital watermarkinformation is embedded by other methods, for example, by adjusting thelength of space between characters. This method will be described later.

[0069]FIG. 5 is a flowchart for explaining an example of a method forembedding a digital watermark by changing the tilt angles of characters.That is, the method corresponds to step S305 in the flowchart shown inFIG. 3. First, in step S501, digital watermark information to beembedded is input. Then, in step S502, a bit to be embedded next isselected from a group of bits constituting the digital watermarkinformation, and a character in which the bit is to be embedded isselected. Then, in step S503, it is determined whether the value of thedigital-watermark-information bit to be embedded is “1”. If the bit isdetermined as “1” (Yes), the tilt angle of the character currentlyselected is changed clockwise in step S504. On the other hand, if thebit is determined as “0” (No), the tilt angle of the character currentlyselected is changed counterclockwise in step S505.

[0070] Furthermore, it is possible to increase the amount of information(the number of bits) that can be embedded in a single character byassigning meaning to absolute values of tilt angles.

[0071] For example, suppose that the range of rotation of characters is0° to 16° and that the tilt angle can be changed by steps of twodegrees. When the tilt angle is changed counterclockwise by steps of twodegrees, digital watermark information represents “0”, “1”, . . . , and“7”. When the tilt angle is changed clockwise by steps of two degrees,digital watermark information represents “8”, “9”, . . . , and “15”.More specifically, if a character has been rotated counterclockwise bytwo degrees, it is determined that digital watermark informationrepresenting “0” is embedded in the character. If a character has beenrotated counterclockwise by four degrees, it is determined that digitalwatermark information representing “1” is embedded in the character. Ifa character has been rotated counterclockwise by 16°, it is determinedthat digital watermark information representing “7” is embedded in thecharacter. If a character has been rotated clockwise by two degrees, itis determined that digital watermark information representing “8” isembedded in the character. If a character has been rotated clockwise byfour degrees, it is determined that digital watermark informationrepresenting “9” is embedded in the character. If a character has beenrotated clockwise by 16°, it is determined that digital watermarkinformation representing “15” is embedded in the character. Accordingly,four bits of information, i.e., one of sixteen values of information,can be embedded in a single character.

[0072] Then, in step S506, it is determined whether the charactercurrently selected is the last character of the document (in which aplurality of document areas has been ordered). If the charactercurrently selected is determined as the last character of the document(Yes), the process of embedding digital watermark information (bits) isexited. On the other hand, if it is determined that the charactercurrently selected is not the last character of the document (No), theprocedure returns to step S502, in which a next character is selected.

[0073] In steps S306 and S307, the image in which digital watermarkinformation has been embedded is created and outputted as a watermarkedimage 108 from the image output unit 107 such as the printer 1616. Theoutput may be in the form of, for example, printing, storage in astorage device, or transmission to another terminal via a network.

[0074] As described above, in the digital-watermark embedding apparatusaccording to this embodiment, first, the original image 100 in whichdigital watermark information 105 is to be embedded is input from theimage input unit 101, and the original image 100 is divided into aplurality of areas in the area dividing unit 102. Then, in the areaordering unit 103, the plurality of divided areas is ordered accordingto a predetermined ordering criterion. Then, in thedigital-watermark-information embedding unit 106, the digital watermarkinformation 105 is embedded in the ordered areas as a digital watermark,and the watermarked image 108 with the digital watermark information 105embedded therein is output from the image output unit 107.

[0075] Next, an apparatus and method for extracting digital watermarkinformation embedded in the manner described above from a document image(digital-watermark extracting apparatus and digital-watermark extractingmethod) will be described.

[0076]FIG. 2 is a block diagram showing the configuration of adigital-watermark extracting apparatus according to the firstembodiment, for extracting digital watermark information embedded in adocument in the manner described above. Referring to FIG. 2, an imageinput unit 201 is connected to the scanner 1617 to allow input of adocument image optically read by the scanner 1617. The image input unit201 may be a device that itself is capable of functioning as a scanner,or a device for receiving data via a network. The image input unit 201is also connected to an area dividing unit 202.

[0077] The area dividing unit 202 has the same functions as the areadividing unit 102 described earlier, and it is connected to an areaordering unit 203. The area ordering unit 203 has the same functions asthe area ordering unit 103 described earlier, and it is connected to acircumscribed-rectangle extracting unit 204. The circumscribed-rectangleextracting unit 204 has the same functions as thecircumscribed-rectangle extracting unit 104 described earlier, and it isconnected to a digital-watermark-information extracting unit 205. Adigital-watermark-information output unit 206 is connected to themonitor 1606 and the digital-watermark-information extracting unit 205,and it is used for outputting digital watermark information 207extracted to the outside. The digital-watermark-information output unit206 may be a device that includes the monitor 1606, or a device thatoutputs data via a network.

[0078] That is, according to the present invention, an apparatus forextracting a digital watermark from a document includes the image inputunit 201 for inputting a document in which digital watermark informationhas been embedded as a digitized document image, the area dividing unit202 for dividing the document image into a plurality of areas, the areaordering unit 203 for ordering the areas, the circumscribed-rectangleextracting unit 204, and the digital-watermark-information extractingunit 205 for extracting the embedded digital watermark information basedon a tilt angle of a character extracted, wherein the digital watermarkinformation 207 is extracted assuming a plurality of text areas as acontinuous string.

[0079] Next, the procedure of a process of extracting a digitalwatermark by the digital-watermark extracting apparatus described abovewill be described. FIG. 4 is a flowchart for explaining the procedure ofthe process for extracting a digital watermark by the digital-watermarkextracting apparatus according to the first embodiment.

[0080] First, in step S401, a document image 200 in which digitalwatermark information is to be extracted is input to the area dividingunit 202 via the image input unit 201 such as the scanner 1617 shown inFIG. 16. The document image may be obtained, for example, by inputting aprinted material from the scanner 1617 and bitmapping the image, orusing image processing software to convert and bitmap electronic datagenerated using a document-editing application program, or variouselectronic data stored on the HDD 1604, or a storage medium connected tothe CD drive 1609, the DVD drive 1610, the FDD 1611, or the like. Instep S402, the area dividing unit 202 divides the input document imageinto a plurality of property areas such as text areas, graphic areas,graph areas, and table areas.

[0081] Then, in step S403, the area ordering unit 203 orders the areashaving text property according to the same criterion used for embeddingthe digital watermark information. Then, in step S404, thecircumscribed-rectangle extracting unit 204 extracts rectanglescircumscribed to the respective areas that have been ordered.

[0082] Then, in step S405, a digital-watermark extracting process isexecuted by the digital-watermark extracting unit 205. FIG. 7 is aflowchart for explaining in detail the digital-watermark extractingprocess in the digital watermark extracting unit 205. That is, theprocess corresponds to step S405 in the flowchart shown in FIG. 4.First, in step S701, a circumscribed rectangle is selected. Then, instep S702, it is determined whether the circumscribed rectangle istilted clockwise. If the circumscribed rectangle is determined as tiltedclockwise (YES), it is determined in step S703 that thedigital-watermark-information bit represents “1”. On the other hand, ifthe circumscribed rectangle is determined as tilted counterclockwise(NO), it is determined in step S704 that thedigital-watermark-information bit represents “0”. In step S705, it isdetermined whether the character in the circumscribed rectangle is thelast character. If the character is the last character, the process isexited. If the character is not the last character, the process returnsto step S701, in which a next circumscribed rectangle is selected.

[0083] After the extraction is completed, in step S406, the digitalwatermark information that has been extracted is output by thedigital-watermark-information output unit 206 such as the monitor 1606.

[0084] In the embodiment described above, document areas are ordered bysize, the number of characters included, etc. so that the document areaswill be ordered in accordance with the amount of digital watermarkinformation that can be embedded in the respective document areas.

[0085] However, the present invention also covers ordering of areasaccording to other criteria.

[0086] For example, three parameters are known to be important indigital watermarking techniques. Namely, the three parameters are the“amount of information” of digital watermark information that can beembedded in an image, “robustness” that allows digital watermarkinformation to be correctly extracted even after an image in which thedigital watermark information is embedded has been modified, anddegradation of “image quality” that occurs when digital watermarkinformation is embedded in an image.

[0087] In the embodiment described above, the ordering criterion relatesto the “amount of information”.

[0088] As modifications of the embodiment, in some cases, it will beeffective to relate the ordering criterion to “robustness” or “imagequality”.

[0089] If the ordering criterion is to be related to “robustness”,document areas are ordered in decreasing order of the size of charactersincluded in each of the document areas. For that purpose, the order ofsteps S303 and S304 shown in FIG. 3 is reversed, and step S303 shown inFIG. 6 is replaced by step S303 shown in FIG. 17. The procedure becomesas follows. When an image has been divided into areas by the areadividing unit 102 or 202 in step S302, prior to ordering the areas instep S303, the circumscribed-rectangle extracting unit 104 or 204 instep S304 extracts circumscribed rectangles.

[0090] Then, in step S303, the average size of circumscribed rectanglesin each of the areas is calculated in step S1701. Then, the areas areordered according to the average values in step S1702.

[0091] If it is determined in step S1703 that a set of areas having thesame average value exists, the areas are ordered in step S1704 based onthe coordinate values thereof according to the second criteriondescribed earlier.

[0092] Subsequent steps (S305 and later) are the same as thecorresponding steps in the embodiment described earlier.

[0093] If the ordering criterion is to be related to “image quality”,areas are ordered with as much consideration as possible paid for theuser to areas where a watermark is embedded, that is, areas where imagequality will be degraded. For example, a title constitutes an area thatis likely to be noticed, so that degradation in image quality will benoticeable if a digital watermark is embedded therein. In this example,an area where a user does not wish to embed digital watermark isspecified interactively, and the area specified is exempted fromordering.

[0094]FIG. 18 is a flowchart showing a procedure of the above operation.The procedure shown in FIG. 18 is basically the same as that shown inFIG. 3. However, steps described below differ. Next to step S304, theresult of division into areas is displayed over the document image onthe monitor 1606 in step S1801, as shown in FIG. 8. Then, in step S1802,the user is allowed to select which of the areas is to be exempted fromembedding of a digital watermark. Subsequent steps (S305 and later) arethe same as the corresponding steps in the embodiment described earlier.

[0095] As will be understood from the procedure described above, theordering based on “image quality” can be employed in combination withthe ordering based on “amount of information”.

[0096] Also, an ordering criterion based on a combination of “imagequality” and “robustness” can be employed by inserting steps S1801 andS1802 in the ordering operation based on “robustness” (i.e., theflowchart in which the order of steps S303 and S304 is reversed).

[0097] An ordering criterion based on a combination of a plurality ofparameters will be even more effective.

[0098] As described above, in the first embodiment, a plurality ofcharacter areas is processed as a continuous character area.Accordingly, information can be efficiently embedded in a limited sizeof character areas.

[0099] Second Embodiment

[0100] In the first embodiment described above, a plurality of characterareas is processed as a continuous character area, so that informationcan be embedded efficiently in a limited size of area. According to themethod, a method of ordering must be common between embedding side andextracting side. However, it could be considered useless to perform thesame ordering operation at the extracting side as well as the embeddingside. A second embodiment described below is based on such idea, inwhich ordering is performed based on relatively easy analysis of areasat the extracting side.

[0101] Furthermore, although this embodiment will be described inrelation to an example where the number of bits to be embedded in eacharea is calculated, and each area is divided into smallest units(hereinafter referred to as “frames”) before an embedding algorithm isapplied. Note, however, the present invention is not limited thereto. Inthis embodiment, in the first frame of each area, information indicatingan order of the area is written (embedded) as a digital watermark. Thus,the extracting side is allowed to order areas easily without examiningcharacteristics of the areas as specifically as in the first embodiment.

[0102]FIG. 12 is a schematic diagram showing how information is embeddedin the second embodiment. The process will be described below in detail.The configurations of a digital-watermark embedding apparatus and adigital-watermark extracting apparatus are the same as those in thefirst embodiment except in that the area ordering unit 103 is replacedby a frame constructing unit.

[0103]FIG. 9 is a flowchart for explaining the entire procedure of thedigital-watermark-information embedding method according to the secondembodiment. The flowchart shown in FIG. 9 differs from the flowchartshown in FIG. 3 in that the area ordering process in step S303 isomitted and in that a frame constructing process is executed in stepS904 subsequent to the circumscribed-rectangle extracting process instep S903.

[0104]FIG. 11 is a flowchart for explaining the frame constructingprocess in the second embodiment. First, in step S1101, an area to beprocessed is selected. Then, in step S1102, the amount of digitalwatermark information that can be embedded in the area selected iscalculated.

[0105] For example, if digital watermark information is embedded usingthe tilt angle of a character with a step size of two degrees ofrotation, since four bits can be embedded in a single character, theamount of information can be calculated by multiplying the number ofcircumscribed rectangles by four. That is, the number of charactersserves as base data for calculating the embedding capacity.

[0106] In step S1103, it is determined whether any character area thatis yet to be processed exists. If all the character areas have beenprocessed (No in step S1103), a frame size is determined in step S1104based on the amount of information that can be embedded in each of theareas. For example, if ASCII characters are to be embedded, the numberof circumscribed rectangles to be included in a frame is determined suchthat the amount of information that can be embedded is at least aninteger multiple of eight bits. Thus, in a document area including twoor more characters, each set of two characters is considered as oneframe. Accordingly, the embedding capacity of one frame is 2×4=8 bits.

[0107] The procedure of embedding digital watermark information isbasically the same as in the first embodiment described earlier.However, information indicating an order for embedding a digitalwatermark for a document is recorded in the first frame. Alternatively,key information indicating an order for reading areas may be provided.That is, in the digital-watermark embedding method according to thisembodiment, information regarding an order for embedding digitalwatermark information is provided as key information or is stored ineach area.

[0108]FIG. 10 is a flowchart showing the procedure of adigital-watermark extracting process according to the second embodiment.The flowchart shown in FIG. 10 differs from the flowchart shown in FIG.4 in that the area ordering process in step S403 is omitted and in thata frame constructing process (step S1004) is added subsequent to thecircumscribed-rectangle extracting process in step S1003. Optionally, astep for ordering areas according to a particular ordering rule thatallows unambiguous ordering may be included, as in the first embodiment.

[0109] The procedure of extracting information is basically the same asin the first embodiment. However, information indicating an order forembedding a digital watermark for a document is recorded in the firstframe. Alternatively, key information indicating an order for readingareas may be provided. That is, in the digital-watermark extractingmethod according to this embodiment, key information regarding an orderfor extracting digital watermark information is provided or informationregarding an order for extracting digital watermark information isstored in each area.

[0110] Also in this embodiment, areas must be ordered in advance at theembedding side, and the method of ordering is the same as that in thefirst embodiment. That is, areas are ordered by size or by the number ofcharacters with emphasis on “the amount of information” as in the firstembodiment.

[0111] Furthermore, the three parameters described in relation to thefirst embodiment, that is, the “amount of information” of digitalwatermark information that can be embedded in an image, “robustness”that allows digital watermark information to be correctly extracted evenafter an image in which the digital watermark information is embeddedhas been modified, and degradation of “image quality” that occurs whendigital watermark information is embedded in an image may be consideredto make similar modifications described in relation to the firstembodiment.

[0112] If the ordering criterion is to be related to “robustness”,document areas are ordered in decreasing order of the size of charactersincluded in each of the document areas. For that purpose, the order ofsteps S303 and S304 shown in FIG. 3 is reversed, and step S303 shown inFIG. 6 is replaced by step S303 shown in FIG. 17. The procedure becomesas follows. When an image has been divided into areas by the areadividing unit 102 or 202 in step S302, prior to ordering the areas instep S303, the circumscribed-rectangle extracting unit 104 or 204 instep S304 extracts circumscribed rectangles.

[0113] Then, in step S303, the average size of circumscribed rectanglesin each of the areas is calculated in step S1701. Then, the areas areordered according to the average values in step S1702.

[0114] If it is determined in step S1703 that a set of areas having thesame average value exists, the areas are ordered in step S1704 based onthe coordinate values thereof according to the second criteriondescribed earlier.

[0115] Subsequent steps (S305 and later) are the same as thecorresponding steps in the embodiment described earlier.

[0116] If the ordering criterion is to be related to “image quality”,areas are ordered with as much consideration as possible paid for theuser to areas where a watermark is embedded, that is, areas where imagequality will be degraded. For example, a title constitutes an area thatis likely to be noticed, so that degradation in image quality will benoticeable if a digital watermark is embedded therein. In this example,an area where a user does not wish to embed digital watermark isspecified interactively, and the area specified is exempted fromordering.

[0117]FIG. 18 is a flowchart showing a procedure of the above operation.The procedure shown in FIG. 18 is basically the same as that shown inFIG. 3. However, steps described below differ. Next to step S304, theresult of division into areas is displayed over the document image onthe monitor 1606 in step S1801, as shown in FIG. 8. Then, in step S1802,the user is allowed to select which of the areas is to be exempted fromembedding of a digital watermark. Subsequent steps (S305 and later) arethe same as the corresponding steps in the embodiment described earlier.

[0118] As will be understood from the procedure described above, theordering based on “image quality” can be employed in combination withthe ordering based on “amount of information”.

[0119] Also, an ordering criterion based on a combination of “imagequality” and “robustness” can be employed by inserting steps S1801 andS1802 in the ordering operation based on “robustness” (i.e., theflowchart in which the order of steps S303 and S304 is reversed).

[0120] An ordering criterion based on a combination of a plurality ofparameters will be even more effective.

[0121] In order for the method of the present embodiment to embeddigital watermark information continuously over a plurality of areas,which is an object of the present invention, information indicating anorder of an area can be represented by adding a special mark (e.g., atwo-dimensional bar code representing an area number) at a predeterminedposition of each area (e.g., the top right corner of a document areathat will be recognized as an area). In that case, digital watermarkinformation can be embedded continuously over a plurality of areaswithout considering boundaries of the areas. Obviously, it is possibleto employ the digital-watermark embedding algorithm employed in thefirst embodiment, or an embedding algorithm in which space lengths areadjusted instead of the embedding algorithm employed in this embodiment.

[0122] Other Embodiments

[0123] Although areas with the same size are ordered by distance fromthe top left of a document image in the first embodiment, the referencepoint may be a different point, such as the top right. Furthermore,although areas with the same size are ordered by distance from the topleft of a document image in the first embodiment, the ordering may bebased on the magnitudes of the x and y coordinate values instead of thedistance. That is, areas may be ordered according to an orderingcriterion based on a relationship of relative positions of characterareas, or a relationship of absolute positions with, for example, thetop left as a reference point.

[0124] Furthermore, although circumscribed rectangles are extractedafter ordering areas based on sizes of the areas and positionalrelationship of the areas in the first embodiment, areas may be orderedby the numbers of characters included in the respective areas aftercircumscribed rectangles have been extracted. Obviously, it is withinthe scope of the present invention to combine the ordering criteriadescribed above with appropriately priorities.

[0125] Although a digital watermark is embedded by rotating (tilting)characters in the first embodiment, alternatively, a digital watermarkmay be embedded by adjusting spaces between characters. Digitalwatermarking by adjusting spaces between characters is described below.

[0126]FIG. 14 is a diagram showing a part of a document image in whichdigital watermark information is yet to be embedded. FIG. 15 is adiagram showing the part of the document image shown in FIG. 14 afterdigital watermark information has been embedded therein. When digitalwatermark information has been embedded, space lengths P0, S0, P1, andS1 between characters shown in FIG. 14 become space lengths P0′, S0′,P1′, and S1′ between characters shown in FIG. 15.

[0127] In FIGS. 14 and 15, five characters and four spaces are shown. Inthis embodiment, two space lengths are assigned to one bit, so that twobits of information can be embedded using four spaces.

[0128] For example, suppose that P>S represents “1” and that P<Srepresents “0”. Referring to FIG. 4, a character 1401 between P0 and S0is shifted left, and a character 1402 between P1 and S1 is shiftedright. The result is a modification of the characters as represented by1501 and 1502 of FIG. 15. In this case, regarding the character stringshown in FIG. 15, P0′<S0′ and P1′<S1′, so that a bit string representing“01” is embedded.

[0129] The objects of the present invention can also be achieved byproviding a system or apparatus with a storage medium (or recordingmedium) having recorded thereon program code of software forimplementing the functions of the embodiments described above so that acomputer (or a CPU or MPU) of the system or apparatus is allowed to readand execute the program code stored in the storage medium. In that case,the functions of the embodiments described above are implemented by theprogram code read from the storage medium, so that the storage mediumstoring the program code constitutes the present invention.

[0130] Furthermore, instead of achieving the functions of theembodiments described above by a computer reading and executing theprogram code, the functions of the embodiments described above may beachieved by executing a part or the entirety of actual processing basedon instructions of the program code by an operating system (OS) or thelike running on the computer, which is also within the scope of thepresent invention.

[0131] Furthermore, the program code read from the storage medium may bewritten to a memory of a functional extension card inserted into thecomputer or a functional extension unit connected to the computer sothat the functions of the embodiments described above will be achievedby executing a part or the entire processing based on instructions ofthe program code by a CPU or the like of the functional extension cardor functional extension unit, which is also within the scope of thepresent invention.

[0132] When the present invention is implemented in the form of thestorage medium, the storage medium stores the program code correspondingto the flowcharts described above.

[0133] As described above, the present invention allows a digitalwatermark to be embedded continuously even in an image in which aplurality of areas is disposed discretely, such as a document image.

[0134] While the present invention has been described with reference towhat are presently considered to be the preferred embodiments, it is tobe understood that the invention is not limited to the disclosedembodiments. On the contrary, the invention is intended to cover variousmodifications and equivalent arrangements included within the spirit andscope of the appended claims. The scope of the following claims is to beaccorded the broadest interpretation so as to encompass all suchmodifications and equivalent structures and functions.

What is claimed is:
 1. A method for embedding a digital watermark,comprising: a step of inputting digital watermark information; a step ofinputting an image; a step of dividing the image into a plurality ofareas; a step of ordering the plurality of areas according to apredetermined ordering criterion; a step of embedding the digitalwatermark information over the plurality of areas that have beenordered; and a step of outputting an image with the digital watermarkinformation embedded therein.
 2. A method according to claim 1, furthercomprising a circumscribed-rectangle detecting step of detectingrectangles circumscribed respectively to characters included in theimage, wherein the digital watermark information is embedded in theembedding step based on the circumscribed rectangles detected.
 3. Amethod according to claim 1, wherein the image input in the input stepis a document image at least including a plurality of document areas. 4.A method according to claim 3, wherein the plurality of document areasincluded in the document image is ordered in the ordering step.
 5. Amethod according to claim 4, wherein the plurality of document areas isordered in the ordering step based on sizes of the respective documentareas.
 6. A method according to claim 5, wherein a plurality of documentareas with the same size is ordered in the ordering step based on arelationship of relative positions thereof.
 7. A method according toclaim 5, further comprising a step of exempting a part of the pluralityof document areas from ordering prior to the ordering step.
 8. A methodaccording to claim 4, wherein the plurality of document areas is orderedin the ordering step based the numbers of characters included in therespective document areas.
 9. A method according to claim 8, wherein aplurality of document images with the same number of characters includedis ordered in the ordering step based on a relationship of relativepositions thereof.
 10. A method according to claim 8, further comprisinga step of exempting a part of the plurality of document areas fromordering prior to the ordering step.
 11. A method according to claim 4,further comprising a second embedding step of embedding informationrepresenting an order of the document areas that have been ordered. 12.A method according to claim 4, wherein digital watermark informationhaving one bit is embedded in the embedding step by rotating a characterincluded in each of the document areas.
 13. A method according to claim4, wherein digital watermark information having a predetermined numberof bits larger than one bit is embedded in the embedding step byrotating a character included in the each of the document areas.
 14. Amethod according to claim 4, wherein digital watermark information isembedded in the embedding step by adjusting a gap between charactersincluded in each of the document areas.
 15. A method according to claim4, wherein digital watermark information is embedded in the embeddingstep by units of a predetermined number of characters included in eachof the document areas.
 16. An apparatus for embedding a digitalwatermark, comprising: an input unit for inputting digital watermarkinformation; an image input unit for inputting an image; an areadividing unit for dividing the image into a plurality of areas; an areaordering unit for ordering the plurality of areas according to apredetermined ordering criterion; an embedding unit for embedding thedigital watermark information over the plurality of areas that have beenordered; and an output unit for outputting the image with the digitalwatermark information embedded therein.
 17. A computer program productstoring a program for embedding a digital watermark, the programcomprising: a step of inputting digital watermark information; a step ofinputting an image; a step of dividing the image into a plurality ofareas; a step of ordering the plurality of areas according to apredetermined ordering criterion; a step of embedding the digitalwatermark information over the plurality of areas that have beenordered; and a step of outputting an image with the digital watermarkinformation embedded therein.
 18. A method for detecting a digitalwatermark, comprising: a step of inputting an image with digitalwatermark information embedded therein; a step of dividing the imageinto a plurality of areas; a step of ordering the plurality of areasaccording to a predetermined ordering criterion; a step of detecting thedigital watermark information from over the plurality of areas that havebeen ordered; and a step of outputting the digital watermark informationdetected.
 19. An apparatus for detecting a digital watermark,comprising: an input unit for inputting an image with digital watermarkinformation embedded therein; a dividing unit for dividing the imageinto a plurality of areas; an area ordering unit for ordering theplurality of areas according to a predetermined ordering criterion; adetecting unit for detecting the digital watermark information from overthe plurality of areas that have been ordered; and an output unit foroutputting the digital watermark information detected.
 20. A computerprogram product storing a program for detecting a digital watermark, theprogram comprising: a step of inputting an image with digital watermarkinformation embedded therein; a step of dividing the image into aplurality of areas; a step of ordering the plurality of areas accordingto a predetermined ordering criterion; a step of detecting the digitalwatermark information from over the plurality of areas that have beenordered; and a step of outputting the digital watermark informationdetected.